package 注解2;

import java.lang.reflect.Method;

public class TestMyAnnotation {
    public static void main(String[] args) throws NoSuchMethodException {
        Method example = MyClass.class.getDeclaredMethod("example");
        MyAnnotation annotation = example.getAnnotation(MyAnnotation.class);
        System.out.println("annotation.value() = " + annotation.value());
    }
}
